package com.example.demo.Pojo;

import lombok.Data;
import lombok.ToString;

import java.util.List;

@Data
@ToString
public class NestedFamily {

    private String my_id;
    private String name;
    private String level;

    private List<NestedFamily> child;
}
/**
 *PUT my-nested-family
 {
 "mappings": {
 "properties": {
 "name":{
 "type": "text"
 },
 "my_id":{
 "type": "keyword"
 },
 "level":{
 "type": "keyword"
 },
 "child": {
 "type": "nested" ,
 "properties": {
 "child":{
 "type": "nested"
 }
 }

 }
 }
 }
 }
 **/